package com.gymmsystem.GYMMSystem.service;


import com.gymmsystem.GYMMSystem.entity.Announcement;

import java.util.List;

public interface AnnouncementService {
    /**
     * 获取所有已发布且未到定时发布时间的公告
     */
    List<Announcement> findAllAnnouncements();

    /**
     * 获取所有公告（排除已删除的）
     */
    List<Announcement> selectAllAnnouncements();

    /**
     * 根据ID更新公告
     */
    boolean updateAnnouncementById(Announcement announcement);

    /**
     * 根据ID逻辑删除公告
     */
    boolean deleteAnnouncementById(Long id);

    /**
     * 根据ID获取公告详情
     */
    Announcement getAnnouncementById(Long id);

    /**
     * 创建新公告
     */
    Long createAnnouncement(Announcement announcement);

    /**
     * 发布公告
     */
    boolean publishAnnouncement(Long id);

    /**
     * 撤回公告
     */
    boolean withdrawAnnouncement(Long id);

}
